<div class="row-content am-cf">
	<div class="row">
		<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
			<div class="widget am-cf">
				<div class="widget-head am-cf" th:switch="${type}">
					<button type="button" th:case="preAudit" onclick="menuLoad('audit/preAuditUI',this)"
						class="am-btn am-btn-success tpl-btn-bg-color-success ">返回</button>
					<button type="button" th:case="audited" onclick="menuLoad('audit/auditedUI',this)"
						class="am-btn am-btn-success tpl-btn-bg-color-success ">返回</button>
					<button type="button" th:case="allAudit" onclick="menuLoad('audit/allAuditUI',this)"
						class="am-btn am-btn-success tpl-btn-bg-color-success ">返回</button>
					<button type="button" th:case="jkreport" onclick="menuLoad('jkreport/userreportDetail',this)"
						class="am-btn am-btn-success tpl-btn-bg-color-success ">返回</button>
				</div>
				<div class="widget-head am-cf">
					<div class="widget-title  am-cf">授信申请详情</div>
				</div>

				<div class="am-progress" style="height: 30px;" th:if="${type}== 'allAudit'">
					<div th:if="${lastGrade}&gt;=10" th:class="am-progress-bar"
						style="width: 20%;vertical-align:middle;">村级代理提交审核</div>
					<div th:if="${lastGrade}&gt;=11" th:class="am-progress-bar"
						style="width: 20%;vertical-align:middle;">镇级代理审批</div>
					<div th:if="${lastGrade}&gt;=12" th:class="am-progress-bar"
						style="width: 20%;vertical-align:middle;">县级代理审批</div>
					<div th:if="${lastGrade}&gt;=99" th:class="am-progress-bar"
						style="width: 20%;vertical-align:middle;">总部审批</div>
					<div th:if="${lastGrade}&gt;=99 and ${not #lists.isEmpty(auditResult)}"
						th:class="am-progress-bar" style="width: 20%">审结</div>
				</div>
				<div class="widget-body  am-fr">
					<div th:if="${not #lists.isEmpty(auditResult)}">
						<ol class="am-breadcrumb">
							<li><a href="#">审批结果</a></li>
						</ol>
						<table class="am-table am-table-bordered">
							<tbody>
								<tr>
									<td class="am-primary">审批决议:</td>
									<td th:text="${auditResult.isPass}">王小二</td>
									<td class="am-primary">审批授信金额：</td>
									<td th:text="${auditResult.realCredit}"></td>
									<td class="am-primary">审批时间：</td>
									<td th:text="${auditResult.auditTime}"></td>
									<td class="am-primary">决议人：</td>
									<td th:text="${auditResult.auditName}"></td>
								</tr>
								<tr th:if="${auditResult.reason} != '' and  ${auditResult.reason} != 'ok' ">
									<td class="am-primary">驳回原因:</td>
									<td colspan="7" th:text="${auditResult.reason}"></td>
								</tr>

							</tbody>
						</table>
					</div>
					<ol class="am-breadcrumb">
						<li><a href="#">授信申请详情</a></li>
					</ol>
					<table class="am-table am-table-bordered">
						<tbody>
							<tr>
								<td class="am-primary">申请授信额：</td>
								<td colspan="3" th:text="${sxDetail.credit}"></td>
								<td class="am-primary">申请时间：</td>
								<td th:text="${sxDetail.createTime}"></td>
							</tr>
							<tr th:each="product : ${productList}">
								<td class="am-primary">产品类型：</td>
								<td th:text="${product.product_name}"></td>
								<td class="am-primary">还款方式：</td>
								<td th:text="${product.payTypeDesc}"></td>
								<td class="am-primary">额度占比：</td>
								<td th:text="${product.lendRateStr}"></td>
							</tr>
							<tr>
								<td class="am-primary">合伙人等级：</td>
								<td th:text="${sxDetail.agentGrade}"></td>
								<td class="am-primary">合伙人姓名：</td>
								<td th:text="${sxDetail.agentName}">王</td>
								<td class="am-primary">合伙人手机号：</td>
								<td th:text="${sxDetail.agentMobile}"></td>
							</tr>

						</tbody>
					</table>
					<ol class="am-breadcrumb">
						<li><a href="#">审批详情</a></li>
					</ol>
					<table class="am-table am-table-bordered">
						<tbody>
							<tr>
								<td class="am-primary">审批流程</td>
								<td colspan="5" th:text="${flowsDesc}"></td>
							</tr>
							<tr th:each="flow : ${auditFlowList}">
								<td class="am-primary" th:text="${flow.gradeName}">镇级代理审批人</td>
								<td th:text="${flow.agentName}">王小二</td>
								<td class="am-primary">审批人电话</td>
								<td th:text="${flow.agentMobile}">15005054695</td>
								<td class="am-primary">审批额度</td>
								<td th:text="${flow.auditCredit}">10000</td>
								<td class="am-primary">审批时间</td>
								<td th:text="${flow.auditTime}">2012-10-01</td>
							</tr>
						</tbody>
					</table>
					<ol class="am-breadcrumb">
						<li><a href="#">用户信息详情</a></li>
					</ol>
					<table class="am-table am-table-bordered">
						<tbody>
							<tr>
								<td class="am-primary">客户姓名</td>
								<td th:text="${sxDetail.jkName}"></td>
								<td class="am-primary">客户身份证</td>
								<td th:text="${sxDetail.jkIdcard}"></td>
								<td class="am-primary">客户性别</td>
								<td th:text="${sxDetail.jkSex}"></td>
							</tr>
							<tr>
								<td class="am-primary">客户手机号</td>
								<td th:text="${sxDetail.jkMobile}"></td>
								<td class="am-primary">客户家庭地址</td>
								<td colspan="3"  th:text="${sxDetail.jkAddress}"></td>
							</tr>
						</tbody>
					</table>
					<ol class="am-breadcrumb">
						<li><a href="#">配偶信息</a></li>
					</ol>
					<table class="am-table am-table-bordered">
						<tbody>
							<tr>
								<td class="am-primary">配偶姓名</td>
								<td th:text="${sxDetail.spouseName}"></td>
								<td class="am-primary">配偶身份证</td>
								<td th:text="${sxDetail.spouseCardId}"></td>
								<td class="am-primary">手机号</td>
								<td th:text="${sxDetail.spouseMobile}"></td>
							</tr>
						</tbody>
					</table>
					<ol class="am-breadcrumb">
						<li><a href="#">房产/宅基地证明</a></li>
					</ol>
					<table class="am-table am-table-bordered">
						<tbody>
							<tr>
								<td class="am-primary">权利人页</td>
								<td class="am-primary">附记页</td>
								<td class="am-primary">抵押合同条款页</td>
								<td class="am-primary">抵押合同签名页</td>
							</tr>
							<tr>
								<td>
									<span th:if="${houseMap['house_qlr']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${houseMap['house_qlr']}+'\')' ">查看</a></span>
									<span th:if="${houseMap['house_qlr']} == null">无</span>
								</td>
								<td>
									<span th:if="${houseMap['house_fj']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${houseMap['house_fj']}+'\')' ">查看</a></span>
									<span th:if="${houseMap['house_fj']} == null">无</span>
								</td>
								<td>
									<span th:if="${houseMap['house_tk']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${houseMap['house_tk']}+'\')' ">查看</a></span>
									<span th:if="${houseMap['house_tk']} == null">无</span>
								</td>
								<td>
									<span th:if="${houseMap['house_qm']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${houseMap['house_qm']}+'\')' ">查看</a></span>
									<span th:if="${houseMap['house_qm']} == null">无</span>
								</td>
							</tr>
						</tbody>
					</table>
					<ol class="am-breadcrumb">
						<li><a href="#">土地承包经营权证明</a></li>
					</ol>
					<table class="am-table am-table-bordered">
						<tbody>
							<tr>
								<td class="am-primary" colspan="6">土地承包经营权证</td>
							</tr>
							<tr>
								<td class="am-primary">土地面积（亩）</td>
								<td class="am-primary">主要作物</td>
								<td class="am-primary">承包经营权证登记页</td>
								<td class="am-primary">地块情况页</td>
								<td class="am-primary">抵押合同条款页</td>
								<td class="am-primary">抵押合同签名页</td>
							</tr>
							<tr>
								<td th:text="${tudiMap['tudiArea']}"></td>
								<td th:text="${tudiMap['crop']}" ></td>
								<td>
									<span th:if="${tudiMap['tudi_dj']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${tudiMap['tudi_dj']}+'\')' ">查看</a></span>
									<span th:if="${tudiMap['tudi_dj']} == null">无</span>
								</td>
								<td>
									<span th:if="${tudiMap['tudi_qk']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${tudiMap['tudi_qk']}+'\')' ">查看</a></span>
									<span th:if="${tudiMap['tudi_qk']} == null">无</span>
								</td>
								<td>
									<span th:if="${tudiMap['tudi_tk']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${tudiMap['tudi_tk']}+'\')' ">查看</a></span>
									<span th:if="${tudiMap['tudi_tk']} == null">无</span>
								</td>
								<td>
									<span th:if="${tudiMap['tudi_qm']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${tudiMap['tudi_qm']}+'\')' ">查看</a></span>
									<span th:if="${tudiMap['tudi_qm']} == null">无</span>
								</td>
							</tr>
							<tr>
								<td class="am-primary" colspan="6">民间土地承包合同</td>
							</tr>
							<tr>
								<td class="am-primary">土地面积（亩）</td>
								<td class="am-primary">主要作物</td>
								<td class="am-primary">承包经营权证登记页</td>
								<td class="am-primary">地块情况页</td>
								<td class="am-primary">抵押合同条款页</td>
								<td class="am-primary">抵押合同签名页</td>
							</tr>
							<tr>
								<td th:text="${tudiMap['tudiArea']}"></td>
								<td th:text="${tudiMap['crop']}" ></td>
								<td>
									<span th:if="${tudiMap['tudi_ht_dj']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${tudiMap['tudi_ht_dj']}+'\')' ">查看</a></span>
									<span th:if="${tudiMap['tudi_ht_dj']} == null">无</span>
								</td>
								<td>
									<span th:if="${tudiMap['tudi_ht_qk']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${tudiMap['tudi_ht_qk']}+'\')' ">查看</a></span>
									<span th:if="${tudiMap['tudi_ht_qk']} == null">无</span>
								</td>
								<td>
									<span th:if="${tudiMap['tudi_ht_tk']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${tudiMap['tudi_ht_tk']}+'\')' ">查看</a></span>
									<span th:if="${tudiMap['tudi_ht_tk']} == null">无</span>
								</td>
								<td>
									<span th:if="${tudiMap['tudi_ht_qm']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${tudiMap['tudi_ht_qm']}+'\')' ">查看</a></span>
									<span th:if="${tudiMap['tudi_ht_qm']} == null">无</span>
								</td>
							</tr>
						</tbody>
					</table>
					<ol class="am-breadcrumb">
						<li><a href="#">车产证明</a></li>
					</ol>
					<table class="am-table am-table-bordered">
						<tbody>
							<tr>
								<td class="am-primary">登记信息栏以及摘要栏</td>
								<td class="am-primary">登记栏最后一页</td>
								<td class="am-primary">抵押合同条款页</td>
								<td class="am-primary">抵押合同签名页</td>
							</tr>
							<tr>
								<td>
									<span th:if="${carMap['car_dj']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${carMap['car_dj']}+'\')' ">查看</a></span>
									<span th:if="${carMap['car_dj']} == null">无</span>
								</td>
								<td>
									<span th:if="${carMap['car_djzh']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${carMap['car_djzh']}+'\')' ">查看</a></span>
									<span th:if="${carMap['car_djzh']} == null">无</span>
								</td>
								<td>
									<span th:if="${carMap['car_tk']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${carMap['car_tk']}+'\')' ">查看</a></span>
									<span th:if="${carMap['car_tk']} == null">无</span>
								</td>
								<td>
									<span th:if="${carMap['car_qm']}  != null"><a href="javascript:void(0)" th:onclick="'javascript:check(\''+${carMap['car_qm']}+'\')' ">查看</a></span>
									<span th:if="${carMap['car_qm']} == null">无</span>
								</td>
							</tr>
						</tbody>
					</table>
					<ol class="am-breadcrumb">
						<li><a href="#">用户信用评级</a></li>
					</ol>
					<ol class="am-breadcrumb">
						<li th:text="'综合得分：'+${score}"></li>
						<li th:text="'信用评级：'+${rating}"></li>
						<li th:text="${ratingDesc}"></li>
					</ol>
					<table class="am-table am-table-bordered am-table-centered">
						<thead>
							<tr>
								<th colspan="1" class="am-primary">信用指标</th>
								<th colspan="4" class="am-primary">评级标准</th>

							</tr>
						</thead>
						<tbody th:each="answer : ${answerList}">
							<tr>
								<!-- <td rowspan="4" class="am-text-middle">镇级代理审批人</td> -->
								<td th:text="${answer.quesetName}">家庭年龄</td>
								<td colspan="4" th:text="${answer.answerName}">http://amazeui.org</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
		</div>

		<div class="am-u-sm-9 am-u-sm-push-2" th:if="${type}== 'preAudit'">
			<button type="button" onclick="bindPrompt('false')" shiro:hasPermission="auditNoPass" class="am-btn am-btn-primary tpl-btn-bg-color-success ">驳回</button>
			<button type="button" onclick="bindPrompt('true')" shiro:hasPermission="auditPass" class="am-btn am-btn-success tpl-btn-bg-color-success ">通过</button>
		</div>
	</div>
</div>
<div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-1" >
  <div class="am-modal-dialog">
   <div class="am-modal-hd">
      <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="data-am-modal-close">&times;</a>
    </div>
 	<div class="am-modal-bd" >
		<img class="am-radius" src="" id="imgId"/>
    </div>
  </div>
</div>
<form id="myForm" method="post">
<div class="am-modal am-modal-prompt" tabindex="-1" id="my-prompt">
	<div class="am-modal-dialog">
	<input type="hidden" id="sxId" th:value="${sxId}"  name="realCredit" />
	<input type="hidden" id="isPass"   name="isPass" />
		<div class="am-modal-hd" id="title">确认通过授信</div>
		<div class="am-modal-bd">
			<span id="msg" style="display:none;color:red"></span>
			<div class="am-modal-bd" id="passDiv">
				<table>
					<tr>
						<td class="am-primary">客户名称：</td>
						<td th:text="${sxDetail.jkName}"></td>
					</tr>
					<tr>
						<td class="am-primary">客户身份证：</td>
						<td th:text="${sxDetail.jkIdcard}"></td>
					</tr>
					<tr>
						<td class="am-primary">审批授信额度：</td>
						<td><input type="text" class="am-modal-prompt-input" name="realCredit" id="realCredit" th:value="${sxDetail.auditCredit}"/></td>
					</tr>
				</table>
			</div>
			<div class="am-modal-bd" id="noPassDiv">
				<textarea rows="3" cols="50" placeholder="输入驳回原因，不超过30个字；" id="reason" name="reason"></textarea>
			</div>
		</div>
		<div class="am-modal-footer">
			<span class="am-modal-btn" data-am-modal-cancel="">取消</span> <span
				class="am-modal-btn" data-am-modal-confirm="">提交</span>
		</div>
	</div>
</div>
</form>
<script type="text/javascript" th:src="@{/customer/audit/auditDetail.js}" />
<script>
   function returnBack(){
	   window.history.back();
   }

</script>
